<?php
function outputRe($pattern,$string){
    if(preg_match_all($pattern,$string,$matched)){
        echo '正则表达式'，htmlenties($pattern),'和字符串';
    htmlenties($string)
var_dump($matched)}else{
    echo'<p>','没有找到匹配字符串'，'<p>';
}
}

///$pattern='/php/';
//$string='hello.php';
//outputRe($pattern,$string);

//$pattern='[a-z,0-9]';
// $string='hello.php121212';
//outputRe($pattern,$string);

$pattern='[a-z,0-9]';
$pattern='/[\x80-\xff]/';
$string='hello.php121212';
outputRe($pattern,$string);






?>